/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jp.co.irep.tech.juten.bean.controller;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import javax.inject.Named;
import jp.co.irep.tech.juten.bean.utils.BeanUtil;

import jp.co.irep.tech.juten.bean.view.AkenViewBean;
import jp.co.irep.tech.juten.service.AkenService;

/**
 *
 * @author toan_nguyen
 */

@Named
public class AkenControllerBean implements Serializable{
    
    @Inject
    private AkenService akenService;
    
    @Inject
    private AkenViewBean akenViewBean;
    
    public String searchAken(){
        Map<String, Object> akenMap = new HashMap<>();
        akenMap.put("id", getAkenViewBean().getAkenId());
        akenMap.put("data", getAkenViewBean().getAkenName());
        getAkenViewBean().setAkenList(getAkenService().getAken(akenMap));
        BeanUtil.setMessage("info", "{xxx.yyy}");
        return "index.jsf?faces-redirect=true";
    }

    public AkenService getAkenService() {
        return akenService;
    }

    public void setAkenService(AkenService akenService) {
        this.akenService = akenService;
    }

    public AkenViewBean getAkenViewBean() {
        return akenViewBean;
    }

    public void setAkenViewBean(AkenViewBean akenViewBean) {
        this.akenViewBean = akenViewBean;
    }

}
